//生成表格列的工厂类方法
Ext.define('gytoa.utils.factory.GridColumnsFactory',{
	name: 'gridColumnsFactory',
	//工厂静态方法
	statics : {
		//根据表格方案容器生成表格列
		getColumns : function(girdSchemaParent) {
			
			var columns = [];
			var girdScheme = girdSchemaParent.schema;
			//表头分组
			for (var i = 0; i < girdScheme.gridHeadGroups.length; i++) {
				var group = girdScheme.gridHeadGroups[i];
				var onegroup = {
					text : group.tf_gridGroupName,
					locked : group.tf_isLocked,
					columns : []
				};
				columns.push(onegroup);
				var isGroupShow = group.tf_showGroup || false;
				for(var  j = 0; j< group.tf_groupColumns.length; j++){
				    var oneColumn = group.tf_groupColumns[j];
					if(isGroupShow){
						onegroup.columns.push(oneColumn);
					}else{
						columns.push(oneColumn);
					}
				}
			};
			return columns;
		}
	
	}
})